package templatemethodtest;

import java.util.Arrays;

public class DuckSortTestDrive {
	public static void main(String[] args) {
		 Duck [] ducks={
				         new Duck("Daffy",8),
				         new Duck("Dewey",2),
				         new Duck("Howard",7),
				         new Duck("Loule",2),
				         new Duck("Donald",10),
				         new Duck("Huey",2)
				         
		 };
		 System.out.println("Before sorting: ");
		 display(ducks);
		 Arrays.sort(ducks);
		 System.out.println("\n After sorting:  ");
		 display(ducks);
	}

	private static void display(Duck[] ducks) {
		// TODO Auto-generated method stub
		for(int i=0;i<ducks.length;i++){
			System.out.println(ducks[i]);
		}
	}

}
